﻿using ScrawlLianjiaData.Server;
using System;

namespace HousePrice
{
    class Program
    {     
        static void Main(string[] args)
        {
            WebCrawler zhizhu = new WebCrawler();
            Console.WriteLine("Input Database:");
            zhizhu.myDatabase = Console.ReadLine();
            zhizhu.mySqlConText = "Database =" + zhizhu.myDatabase + ";";
            Console.WriteLine("Input Data Source:");
            zhizhu.mySqlConText += "Data Source =" + Console.ReadLine() + ";";
            Console.WriteLine("Input User Id:");
            zhizhu.mySqlConText += "User Id =" + Console.ReadLine() + ";";
            Console.WriteLine("Input Password:");
            zhizhu.mySqlConText += "Password =" + Console.ReadLine() + ";";
            Console.WriteLine("Input Port:");
            zhizhu.mySqlConText += "Port =" + Console.ReadLine() + ";";
            zhizhu.mySqlConText += "pooling=false;CharSet=utf8;";
            zhizhu.ReadConfiguration();
            zhizhu.SetDatabase();
            zhizhu.Start();
        }
    }
}
